package com.scu.service;

import com.scu.dao.NoticeDao;
import com.scu.pojo.Notice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class NoticeServiceImpl implements NoticeService {

    @Autowired
    private NoticeDao noticeDao;

    @Override
    public List<Notice> getNotice() {
        return noticeDao.getNotice();
    }

    @Override
    public int addNotice(Notice notice) {
        return noticeDao.addNotice(notice);
    }

    @Override
    public int updateNotice(Notice notice) {
        return noticeDao.updateNotice(notice);
    }

    @Override
    public int deleteNotice(int notice_id) {
        return noticeDao.deleteNotice(notice_id);
    }

    @Override
    public Notice getNoticeDetail(int notice_id) {
        return noticeDao.getNoticeDetail(notice_id);
    }
}
